package com.yang.controller;


import com.yang.exception.BusinessException;
import com.yang.pojo.SysUser;
import com.yang.service.SysUserService;
import com.yang.utils.JsonResult;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

@RestController
@RequestMapping("/api/sysUser")
public class SysUserController {
    @Resource
    SysUserService sysUserService;

    /* 获取个人资料*/
    @GetMapping("/getSubject")
    public Map<String,Object> getSubject(){
        return sysUserService.getSubject();
    }

    /* 修改个人资料*/
    @PostMapping("/updateSysUser")
     public Map<String,Object> updateSysUser(@RequestBody SysUser sysUser){
        return sysUserService.updateSysUser(sysUser);
    }

}
